package com.firefly.web.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * @description: 异常处理控制器
 * @author: lzg(萤火科技 ： 854378082 @ qq.com)
 * @date: 2023/5/22
 **/
@RestController
public class ExceptionController {
    @RequestMapping("/error/throw")
    public void handleException(HttpServletRequest request) throws Exception {
        throw ((Exception) request.getAttribute("filter.error"));
    }
}